<div class="topic-action">
    {% if service.canAccess('thread.update', thread) %}
      <a href="{{ path( target.type ~ '_thread_update', {(target.type ~ 'Id'): target.id, threadId:thread.id}) }}"><i class="es-icon es-icon-edit"></i> 编辑</a>
    {% endif %}
    {% if service.canAccess('thread.delete', thread) %}
      <a href="javascript:;"data-url="{{ path('thread_delete', {threadId:thread.id}) }}" data-after-url="{{ path(target.type ~ '_threads', {(target.type ~ 'Id'): target.id}) }}" data-role="confirm-btn" data-confirm-message="您真的要删除该帖吗？"><i class="es-icon es-icon-delete"></i>删除</a>
    {% endif %}

    {% if service.canAccess('thread.sticky', thread) %}
      {% if thread.sticky %}
        <a href="javascript:" data-url="{{ path('thread_cancel_sticky', {threadId:thread.id}) }}" data-role="confirm-btn" data-confirm-message="您真的要取消置顶该帖吗？"><i class="es-icon es-icon-publish"></i>取消置顶</a>
      {% else %}
        <a href="javascript:"  data-url="{{ path('thread_set_sticky', {threadId:thread.id}) }}" data-role="confirm-btn" data-confirm-message="您真的要置顶该帖吗？"><i class="es-icon es-icon-publish"></i>置顶</a>
      {% endif %}
    {% endif %}

    {% if service.canAccess('thread.sticky', thread) %}
      {% if thread.nice %}
        <a href="javascript:" data-url="{{ path('thread_cancel_nice', {threadId:thread.id}) }}"data-role="confirm-btn" data-confirm-message="您真的要取消加精该帖吗？"><i class="es-icon es-icon-thumbup"></i>取消加精</a>
      {% else %}
        <a href="javascript:" data-url="{{ path('thread_set_nice', {threadId:thread.id}) }}"data-role="confirm-btn" data-confirm-message="您真的要加精该帖吗？"><i class="es-icon es-icon-thumbup"></i>加精</a>
      {% endif %}
    {% endif %}

    {% if thread.type == 'event' %}
      {% if service.canAccess('thread.update', thread) %}
        <a href="{{ path('thread_export_members', {threadId:thread.id}) }}" target="_balnk"><i class="es-icon es-icon-fileupdate"></i> 导出成员</a>
      {% endif %}
    {% endif %}
</div>  